<script type="text/javascript" src="${base}/scripts/xsgl/nbxsdcontent.js"></script>
<form id="nbxsdForm" method="post" class="easyui-tabs" fit="true">
<input type="hidden" id="nbxsd_zgjgId" value="${(gsId)!}"/>
<input type="hidden" id="nbxsd_zggsId" value="${(zggsId)!}"/>
<input type="hidden" id="nbxsd_xsdh" value="${(xsd.xsdh)!}"/>
<input type="hidden" id="nbxsd_ewmtime" value="${(ewmtime)!}"/>
<input type="hidden" id="nbxsd_ll"/>

<div title="销售信息" style="height: 100%;overflow-y: auto">
    <table style="width:98%" class="tb tab-t">
        <col width="110px"/>
        <col width=""/>
        <col width="110px"/>
        <col width=""/>
        <col width="110px"/>
        <col width=""/>
        <tr style="height: 10px;"></tr>
        <tr>
            <th>销售类型：</th>
            <td>
                <input type="hidden" name="xsd.xslx" value="nbxs"/>
                <input type="text" class="input-text" id="xsd_xslx_mc" value="内部销售"  readonly="readonly"/>
            </td>
            <th>采购公司：</th>
            <td>
                <input id="xsd_kh_id" name="xsd.kh.id" type="text" value="${(xsd.kh.id)!}" class="input-text" required="true"/>
            </td>
            <th>采购部门：</th>
            <td>
                <input id="xsd_khbm" value="${(xsd.khbm.id)!}" type="hidden"/>
                <input id="xsd_khbm_id" name="xsd.khbm.id" type="text" value="${(xsd.khbm.id)!}" class="input-text" required="true"/>
            </td>
        </tr>
        <tr>
            <th>销售公司：</th>
            <td>
                <input id="xsd_xsgs_id" name="xsd.xsgs.id" type="hidden" class="input-text"
                       value="<#if xsd??>${(xsd.xsgs.id)!}<#else>${(yg.zggs.id)!}</#if>"/>
                <input id="xsd_xsgs_jc" type="text" class="input-text" readonly="readonly"
                       value="<#if xsd??>${(xsd.xsgs.jc)!}<#else>${(yg.zggs.jc)!}</#if>"/>
            </td>
            <th>提货仓库：</th>
            <td>
                <input id="xsd_thck_id" name="xsd.thck.id" type="text" value="${(xsd.thck.id)!}" class="input-text"/>
            </td>
            <th>开单日期：</th>
            <td>
                <input name="xsd.sxsj" class="easyui-datebox input-text"
                       value="<#if xsd??>${(xsd.sxsj?date)!}<#else>${startDate?date}</#if>"/>
            </td>
        </tr>
        <tr>
            <th>计划发货：</th>
            <td>
                <input name="xsd.fhsj" type="text" class="easyui-datebox input-text""
                value="<#if xsd??>${(xsd.fhsj?date)!}<#else>${startDate?date}</#if>"/>
            </td>
            <th>税率(%)：</th>
            <td>
                <input id="xsd_sl" name="xsd.sl" class="easyui-combobox input-text" type="text"
                       value="<#if xsd??>${(xsd.sl?string("0.0000") )!}<#else>17.0000</#if>"
                       data-options="precision:4,min:0,max:100"/>
            </td>
        </tr>
        <tr>
            <th>发运责任：</th>
            <td>
                <input id="xsd_fyzr_id" name="xsd.fyzr.id" class="input-text" value="${(xsd.fyzr.id)!}"/>
            </td>
            <th>代收费用：</th>
            <td>
                <input name="xsd.dsyfje" type="text" value="${(xsd.dsyfje)!}" class="easyui-numberbox input-text"
                       data-options="precision:4,min:0"/>
            </td>
            <th>提&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
                <input name="xsd.thr" class="input-text" value="${(xsd.thr)!}"/>
            </td>
        </tr>
        <tr>
            <th>交货时间：</th>
            <td>
                <input id="xsd_jhsj" name="xsd.jhsj" class="easyui-datebox input-text"
                       value="<#if xsd??>${(xsd.jhsj?date)!}<#else>${datetime?date}</#if>"/>
            </td>
            <th>送货地址：</th>
            <td colspan="3">
                <input id="xsd_jhdz" name="xsd.jhdz" maxlength="50" class="input-text" style="width: 495px"
                       value="${(xsd.jhdz)!}"/>
            </td>
        </tr>
        <tr>
            <th>收&nbsp;货&nbsp;&nbsp;人：</th>
            <td>
                <input name="xsd.shry" type="text" class="input-text" value="${(xsd.shry)!}"/>
            </td>
            <th>联系电话：</th>
            <td>
                <input name="xsd.shrdh" class="input-text" type="text"
                       value="${(xsd.shrdh)!}"/>
            </td>
            <th>交货要求：</th>
            <td>
                <input name="xsd.jhyq" class="input-text" type="text"
                       value="${(xsd.jhyq)!}"/>
            </td>
        </tr>
        <tr>
            <th>申报公司：</th>
            <td>
                <input id="xsd_sbgs_jc" type="text" class="input-text" readonly="true"
                       value="<#if xsd??>${(xsd.sbgs.jc)!}<#else>${(yg.zggs.jc)!}</#if>"/>
                <input id="xsd_sbgs_id" name="xsd.sbgs.id"
                       value="<#if xsd??>${(xsd.sbgs.id)!}<#else>${(yg.zggs.id)!}</#if>" type="hidden"/>
            </td>
            <th>申报部门：</th>
            <td>
                <input id="xsd_sbbm_qc" type="text" class="input-text" readonly="true"
                       value="<#if xsd??>${(xsd.sbbm.qc)!}<#else>${(yg.zgjg.qc)!}</#if>"/>
                <input id="xsd_sbbm_id" name="xsd.sbbm.id"
                       value="<#if xsd??>${(xsd.sbbm.id)!}<#else>${(yg.zgjg.id)!}</#if>" type="hidden"/>
            </td>
            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
                <input type="hidden" id="xsd_sbr_id" name="xsd.sbr.id"
                       value="<#if xsd??>${(xsd.sbr.id)!}<#else>${(yg.id)!}</#if>"/>
                <input id="xsd_sbr_xm" type="text" class="input-text" readonly="readonly"
                       value="<#if xsd??>${(xsd.sbr.xm)!}<#else>${(yg.xm)!}</#if>"/>
            </td>
        </tr>
        <tr>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="5">
                <textarea name="xsd.bz" rows="6" cols="45" class="textarea"
                          style="width: 822px">${(xsd.bz)!}</textarea>
            </td>
        </tr>
    </table>
</div>
<div title="销售明细">
    <div id="nbxsd_xsdmx_toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a name="nbxsd_xzxsdmx" href="javascript:void(0);" plain="true">新增销售明细</a></li>
                <li><a name="nbxsd_scxsdmx" href="javascript:void(0);" class="del" plain="true">删除销售明细</a></li>
            </ul>
        </div>
    </div>
    <table id="nbxsd_mx">
    </table>
</div>
<div title="费用明细">
    <div id="nbxsd_xsdfy_toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a name="nbxsd_xzxsdfy" href="javascript:void(0);" plain="true">新增销售费用</a></li>
                <li><a name="nbxsd_scxsdfy" href="javascript:void(0);" class="del" plain="true">删除销售费用</a></li>
            </ul>
        </div>
    </div>
    <table id="nbxsd_fy">
    </table>
</div>
<div title="销售单打印">
    <div id="nbxsddy-toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><span class="xuan">选择打印机：</span>
                    <select class="ze" name="" style="">
                        <option>——默认——</option>
                    </select>
                </li>
                <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall()">检查插件</a></li>
                <li><a class="watch" href="javascript:void(0);" onclick="xsddyPrintPreview()">打印预览</a></li>
                <li><a class="pen" href="javascript:void(0);" onclick="xsddyPrint()">打印</a></li>
            </ul>
            <ul class="niu">
                <li><a href="javascript:void(0);" class="rep" plain="true"
                       onclick="nbcslClick('cksl_name');">出售联</a></li>
                <li><a href="javascript:void(0);" class="rep" plain="true"
                       onclick="nbthdClick('cksl_name');">提货单</a></li>
                <li><a href="javascript:void(0);" class="rep" plain="true"
                       onclick="nbshdClick('cksl_name');">送货单</a></li>
            </ul>
        </div>
        <div id="nbxsddy_id">
            <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
                <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0
                       pluginspage="install_lodop32.exe"></embed>
            </object>

            <div id="nbxsddy_print_id" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="12%;"/>
                        <col width="34%"/>
                        <col width="20%;"/>
                        <col width="34%"/>
                    </colgroup>
                    <caption align="center" id="xsd_csl">
                    ${(xsd.xsgs.qc)!}销售单(出售联)
                    </caption>

                    <caption align="center" id="xsd_thd" style="display: none">
                    ${(xsd.xsgs.qc)!}销售单(提货单)
                    </caption>

                    <caption align="center" id="xsd_shd" style="display: none">
                    ${(xsd.xsgs.qc)!}销售单(送货单)
                    </caption>

                    <tbody>
                    <input name="xsd.id" type="hidden" value="${(xsd.id)!''}"/>

                    <tr>
                        <th>销售单号:</th>
                        <td>
                            <input id="nbxsddy_xsdh" class="input-tian" readonly="readonly"  style="width:250px"
                                   value="${(xsd.xsdh)!}"/></td>
                    </tr>

                    <tr>
                        <th>销售公司:</th>
                        <td>
                            <input id="nbxsddy_xsgs" class="input-tian" readonly="readonly"
                                   value="${(xsd.xsgs.qc)!}"/>
                        </td>
                        <th>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户:</th>
                        <td>
                            <input id="nbxsddy_kh" class="input-tian" readonly="readonly" value="${(xsd.kh.jc)!}"/>
                        </td>
                    </tr>
                    <tr>
                        <th>开单日期:</th>
                        <td>
                            <input id="nbxsddy_sxsj" class="input-tian" readonly="readonly"
                                   value="<#if xsd??>${(xsd.sxsj?date)!}<#else>${startDate?date}</#if>"/>
                        </td>
                        <th>交货日期:</th>
                        <td>
                            <input id="nbxsddy_jhsj" class="input-tian"
                                   readonly="readonly" <#--value="${(xsd.jhsj?date)!}"/>-->
                                   value="<#if xsd??>${(xsd.jhsj?date)!}<#else>${datetime?date}</#if>"/>
                        </td>
                    </tr>
                    <tr id="nbxsddy_ck" style="display: none">
                        <th>出库仓库:</th>
                        <td>
                            <input class="input-tian" readonly="readonly" value="${(xsd.thck.mc)!}"/>
                        </td>
                    <#--</tr>
                    <tr id="xsddy_tdrq" style="display: none">-->
                        <th>提单有效日期:</th>
                        <td>
                            <input id="nb_fhrq_start" type="text" style="width:166px;" class="easyui-datebox"
                                   value="${(currentTime?date)!}"/>
                            至<input id="nb_fhrq_end" type="text" style="width:166px;" class="easyui-datebox"
                                    value="${(currentTime?date)!}"/>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div id="nbxsddy_xsd_id" class="textcon"></div>

            <div id="xsddy_xia_id" class="textcon">
                <table class="tb" style="width: 100%;font-size:13px;">
                    <colgroup>
                        <col width="9%;"/>
                        <col width="35%"/>
                        <col width="16%;"/>
                        <col width="34%"/>
                    </colgroup>

                    <tbody>
                    <#--   <input name="xsd.id" type="hidden" value="${(xsd.id)!''}"/>-->
                    <tr>
                        <th>提货人:</th>
                        <td>
                            <input id="nb_xsddy_thr" class="input-tian" readonly="readonly"
                                   value="${(xsd.thr)!}"/></td>
                        <th>制单人:</th>
                        <td>
                            <input id="nb_xsddy_zdr" class="input-tian" readonly="readonly"
                                   value="${(zdr)!}"/>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td colspan="1"></td>
                        <th></th>
                        <td>${(currentTime?string('yyyy-MM-dd HH:mm:ss'))!}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

</form>